package com.atguigu.guli.service.edu.controller;

import com.atguigu.guli.common.base.result.R;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/user")
public class LoginController {
    //登录
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    //获取用户信息
    @GetMapping("info")
    public R info(){
        return R.ok().data("name","admin")
                .data("roles","[admin]")
        .data("avatar","https://fc1tn.baidu.com/it/u=2136174579,2476475364&fm=202&mola=new&crop=v1");
    }

}



























